package com.amrit.revision;


public class StringTest implements Comparable<String>{
	public static void main(String[] args) {
		String s1 = "abc";
		String s2 = new String("abc");
		String s3 = "abc";
		String s4 = new String("abc");
		System.out.println(System.identityHashCode(s1));
		System.out.println(System.identityHashCode(s2));
		System.out.println(System.identityHashCode(s3));
		System.out.println(System.identityHashCode(s4));
		/*System.out.println(s1 == s3);
		System.out.println(s1 == s2);
		System.out.println(s1 == s2.intern());
		System.out.println(s2 == s3.intern());
		System.out.println(s3 == s4.intern());
		System.out.println(s2.equals(s4));*/
		System.out.println(s1.compareTo(s3));
	}

	@Override
	public int compareTo(String str) {
		// TODO Auto-generated method stub
		return 0;
	}
}